package com.fone.player.sns;

import com.fone.player.sns.bean.SNSUserInfo;
import com.fone.player.sns.bean.ShareInfo;

public interface ISNSShareManager {

	public static String SINA_WEIBO_LOCALSNSINFO = "sinalocal.txt";
	public static String TENCENT_WEIBO_LOCALSNSINFO = "tencentlocal.txt";
	
	public final static int DEFAULT_TYPE = 0;
	public final static int SINA_WEIBO_TYPE = 1;
	public final static int TENCENT_WEIBO_TYPE = 2;
	public final static int TENCENT_QQ_TYPE = 3;
	public final static int TENCENT_WEIXIN_TYPE = 4;
	public final static int TENCENT_WEIXIN_FRIEND_TYPE = 5;
	
	/**
	 * 消息分享
	 * @param shareInfo 分享消息的bean
	 */
	public void shareMessage(ShareInfo shareInfo);
	
	/**
	 * 设置分享状态监听
	 * @param shareStateListener
	 */
	public void setShareStateListener(ShareStateListener shareStateListener);
	
	/**
	 * 获取已经设置的分享状态监听
	 * @return ShareStateListener
	 */
	public ShareStateListener getShareStateListener();
	
	/**
	 * 分享监听
	 * @author user
	 *
	 */
	public interface ShareStateListener{
		
		public final static int  SHARING = 1;
		public final static int  SHARE_SUCCESS = 2;
		public final static int  SHARE_CANCEL = 3;
		public final static int  SHARE_FAILED = 4;
		
		/**
		 * 分享事件的回调
		 * @param action 事件类型
		 * 		ShareStateListener.SHARING					开始分享时调用
		 * 		ShareStateListener.SHARE_SUCCESS			分享成功后调用
		 * 		ShareStateListener.SHARE_CANCEL				取消分享时调用
		 * 		ShareStateListener.SHARE_FAILED				分享失败时调用
		 * @param info 事件信息
		 */
		public void shareAction(int action, String info);
		
		/**
		 * 分享后获取用户信息的事件回调
		 * @param user 用户信息类
		 */
		public void onUserInfoComplete(SNSUserInfo user);
	}
	
}
